Add support for svgo 2.x and 3.x#224
Conversation
|
Thank you for opening the PR! |
|
I've modified the patch to memoise the config file so it's only created once. As to testing it would be nice but I'm struggling to figure out how to test it... Are there even any tests that run svgo conversions? I can see there's a test svg file but I can't see what uses it? Even then I'm not sure how you'd test that this is working let alone testing the fallback path when we only have a current svgo. |
to include the new revision of toy/image_optim#224
|
I tried testing how it works and understood that current solution will work only for disabling plugins included in Simple way to handle this is to just list all enabled plugins after What do you think? |
|
You're definitely right that enabled plugins should be listed after the defaults rather than as overrides in the default set, so I've made that change. You're also right that in principle plugins may need to be configured, but I don't think that was possible before so as it stands I htink this now restores the legacy functionality? A future enhancement to allow plugins to be configured is definitely a possibility though. |
toy
left a comment
There was a problem hiding this comment.
Looks good, I only caused a merge conflict when added a check of plugin names, so that it should be safe to output them unquoted in config
7eb51f7 to
68b5e32
Compare
4ff340c to
40443d1
Compare
|
I understood that using tap doesn't close the file, so I add it myself and also a changelog entry |
|
Thank you! |
|
Included in 0.32.0 |
This resolves #191 by generating a configuration file for svgo if the version is 2.x or higher.